package com.ymatou.iapi.godproductsearch.testcase;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.iapi.godproductsearch.parameter.getProductBrandBean;
import com.ymatou.iapi.godproductsearch.service.getProductBrandCall;
import com.ymatou.iapi.productsynces.parameter.ESBean;
import com.ymatou.iapi.productsynces.service.ESCall;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.*;
import com.ymt.utils.tag.*;
import com.ymttest.utils.TestDataManager;
/**
*根据买手Id获取买手品牌
*FreeMaker Template自动生成代码
*/
@TestSuite
public class Ts_getProductBrand{
	private static getProductBrandBean bean;
	private static getProductBrandCall call;
	private static ESBean esBean;
	private static ESCall escall;
	
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("根据买手Id获取买手品牌");
	}

	@Before
	public void caseUp() {
		bean=new getProductBrandBean();
		call=new getProductBrandCall();
		escall=new ESCall();
		esBean=new ESBean();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(call.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_getProductBrand_001() {
		Logger.start(true,"正例-根据买手Id获取买手品牌");
		try {
            
			bean.setSellerId(3383);
            bean.setappId("es搜索_"+TestDataManager.getRandomIntNum(10));
			call.setData(bean);
			call.callService();			
			//校验
			Logger.verifyEquals("true", call.getSuccess(), "验证返回的success");
			
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}